package com.GC;

import org.junit.Test;

/**
 * Created by dev on 16-7-13.
 */
public class ReferenceCountingGC {

    public  Object instance =null;
    private static final int _1MB =1024*1024;

    private byte[] bigSize = new byte[2* _1MB];


    @Test
    public  void testGC() throws Throwable{
        ReferenceCountingGC objA = new ReferenceCountingGC();
        ReferenceCountingGC objB = new ReferenceCountingGC();
        objA.instance=objB;
        objB.instance=objA;
        objA=null;
        objB=null;


        System.gc();



    }




}
